<template>
  <a-dropdown placement="bottomRight">
    <span class="ant-pro-account-avatar">
      <span>
        <!-- <a-icon v-if="loading" type="loading" :style="{ fontSize: '20px', color: '#08c' }"/>
        <a-icon v-else type="setting" :style="{ fontSize: '20px', color: '#fff',disabled:none }"/> -->
        <a-icon type=' '> </a-icon>
      </span>
    </span>
    <!-- <template v-slot:overlay>
      <a-menu class="ant-pro-drop-down menu" :selected-keys="[]">
        <a-menu-item @click="notifyHome">
          <a-icon type="home" />
          <span>生成首页</span>
        </a-menu-item>
        <a-menu-item @click="notifyWholeSite">
          <a-icon type="global" />
          <span>生成全站</span>
        </a-menu-item>
        <a-menu-item @click="notifyToNosql()">
          <a-icon type="retweet" />
          <span>重置索引</span>
        </a-menu-item>
        <a-menu-item @click="flushdb">
          <a-icon type="delete" />
          <span>清除缓存</span>
        </a-menu-item>
      </a-menu>
    </template> -->
  </a-dropdown>
</template>

<script>
// import { notifyHomePage } from '@/api/site/channer.js'
export default {
  name: 'OperaDropdown',
  components: {},
  data () {
    return {
      loading: true
    }
  },
  created () {
    const _this = this
    setTimeout(() => {
       _this.loading = false
    }, 1000)
  },
  methods: {
    notifyHome () {
      this.$store.dispatch('notifyHome')
    },
    notifyWholeSite () {
       this.$store.dispatch('notifyWholeSite')
    },
    notifyToNosql () {
      this.$store.dispatch('notifyToNosql')
    },
    flushdb () {
      this.$store.dispatch('flushdb')
    }
  }
}
</script>

<style lang="less" scoped>
  .ant-pro-drop-down {
    /deep/ .action {
      margin-right: 8px;
    }

    /deep/ .ant-dropdown-menu-item {
      min-width: 160px;
    }
  }
</style>
